package models;

import java.util.ArrayList;

public class SubStyleList {
	private static SubStyleList instance;
	private ArrayList<SubStyle>subStyleList= new ArrayList<SubStyle>();
	
    public static SubStyleList getInstance() {
        if (null == instance) { 
            instance = new SubStyleList();
        }
        return instance;
    }


	
	public ArrayList<SubStyle> getSubStyleList() {
		return subStyleList;
	}



	public void setSubStyleList(ArrayList<SubStyle> subStyleList) {
		this.subStyleList = subStyleList;
	}



	public void addSubStyle(SubStyle ss){
		subStyleList.add(ss);
		
	}
	
	public SubStyle getSubStyleByName(String name){
		SubStyle subStyle=null;
		for(int i=0; i<subStyleList.size(); i++){
			if(subStyleList.get(i).getName().equals(name)){
				subStyle=subStyleList.get(i);
			}
		}
		return subStyle;
	}
    
    

}
